home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload Trio 2
/
Shareware Overload Trio Volume 2 (Chestnut CD-ROM).ISO
/
dir40
/
mkprt101.zip
/
MAKEPORT.PAS
< prev
Wrap
Pascal/Delphi Source File
|
1994-05-12
|
1KB
|
41 lines
program makeport; {This program installes com ports not installed because
of buggy BIOSes often when a 16550 is installed, or
deinstalled by DOS sometimes. Simply put makeport in
the autoexec.bat file, and the ports will be installed
when you boot the computer. The command format is:
MAKEPORT This will install com1
MAKEPORT 1 This will also install com1
MAKEPORT 2 This will install com2
MAKEPORT 3 This will install com3 at 3E8
MAKEPORT 4 This will install com4 at 2E8}
{Added 5/12/94 by Neil Parks: MAKEPORT P sets LPT1 to hex 378}
var port :array [1..5] of word absolute $40:0;
portnum,errorcode :word;
begin
if paramcount = 0 then
port[1] := $3f8
else
if (paramstr(1) = 'P') or (paramstr(1) = 'p') then
port[5] := $378
else
begin
val(paramstr(1),portnum,errorcode);
if errorcode <> 0 then
begin
writeln('Error ',errorcode,' converting ',paramstr(1),' to a number.');
halt(1);
end;
case portnum of
1: port[1] := $3f8;
2: port[2] := $2f8;
3: port[3] := $3e8;
4: port[4] := $2e8;
else Writeln('Com ports 0 and over 4 not supported.')
end; {case of}
end;
end.